package pactera.tf.service.impl;

import lombok.extern.slf4j.Slf4j;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pactera.tf.dataobj.GroupChatDO;
import pactera.tf.mapper.GroupChatMapper;
import pactera.tf.service.GroupChatService;

@Service
@Slf4j
public class GroupChatServiceImpl implements GroupChatService {
    @Autowired
    private GroupChatMapper chatGroupMapper;

    @Override
    public void addUserToChatGroup(GroupChatDO chatGroupDO) {
        chatGroupMapper.addUserToChatGroup(chatGroupDO);
    }

    @Override
    public GroupChatDO getGroupInfoByKey(GroupChatDO chatGroupDO) {
        return chatGroupMapper.getGroupInfoByKey(chatGroupDO);
    }

	@Override
	public List<String> getUserByGroupId(String groupId) {
		return chatGroupMapper.getUserByGroupId(Integer.valueOf(groupId));
	}
}
